#!/bin/bash

# this is an sample shell script
# you will need to develop this to 
# complete the assignment for week 7

echo "Test Case 1: Testing 23/23..."


a=`java -jar Grades_v2.jar 23 23`

if [ "$a" = "Component Fail" ]
  then
  echo "Test Passed"
else
  echo "Test Failed"
fi
echo "__________________________________________"
echo "Test Case 2: Testing 30/30..."


b=`java -jar Grades_v2.jar 30 30`

if [ "$b" = "Component Fail" ]
  then
  echo "Test Passed"
else
  echo "Test Failed"
fi
echo "_________________________________________"
echo "Test Case 3: Testing 40/40..."


c=`java -jar Grades_v2.jar 40 40`

if [ "$c" = "Fail" ]
  then
  echo "Test Passed"
else
  echo "Test Failed"
fi
echo "_________________________________________"
echo "Test Case 4: Testing 50/45..."


d=`java -jar Grades_v2.jar 50 45`

if [ "$d" = "Fail" ]
  then
  echo "Test Passed"
else
  echo "Test Failed"
fi
echo "_________________________________________"

echo "Test Case 5: Testing 60/50..."


e=`java -jar Grades_v2.jar 60 50`

if [ "$e" = "Pass" ]
  then
  echo "Test Passed"
else
  echo "Test Failed"
fi


echo "_________________________________________"


echo "Test Case 6: Testing 75/80..."


e=`java -jar Grades_v2.jar 75 80`

if [ "$e" = "Pass" ]
  then
  echo "Test Passed"
else
  echo "Test Failed"
fi


echo "_________________________________________"

echo "Test Case 7: Testing 80/80..."


e=`java -jar Grades_v2.jar 80 80`

if [ "$e" = "Pass with distinction" ]
  then
  echo "Test Passed"
else
  echo "Test Failed"
fi


echo "_________________________________________"

echo "Test Case 8: Testing 100/100..."


f=`java -jar Grades_v2.jar 100 100`

if [ "$f" = "Pass with distinction" ]
  then
  echo "Test Passed"
else
  echo "Test Failed"
fi


echo "_________________________________________"
